function getUserList(cb){
    $.ajax({
        url: api.user.list,
        success: cb
    })
}

function login(data, success){
    $.ajax({
        url: api.user.login,
        data,
        success
    })
}

function addUser(data, success){
    $.ajax({
        url: api.user.add,
        data,
        success
    })
}

function delUser(id, success){
    $.ajax({
        url: api.user.del,
        data: { id },
        success
    })
}

function updateUser(data, success){
    $.ajax({
        url: api.user.update,
        type: "POST",
        data,
        success
    })
}